package com.example.demo;

import com.example.demo.config.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Created on 2021/3/31.
 * @Author by zbk
 * @Description:
 */
@Configuration
public class Main {

    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("application.xml");
        Person person = ac.getBean("person", Person.class);
        System.out.println(person.getName());


    }
}
